package com.yyplatform.frontend.infra.exception;

/**
 * Created on 2024-09-13
 */
public enum ErrorCode {
    SUCCESS(0, "OK"),

    INTERNAL_SERVER_ERROR(500, "内部异常"),
    UNAUTHORIZED(401, "未授权异常"),
    UNKNOW_ERROR(99, "未知异常"),


    DB_RECORD_EXISTS(601, "数据插入重复"),
    //

    WECHAT_MIN_APP_LOGIN_SERVER_ERROR(100_001_001, "微信小程序登录异常"),
    ALIPAY_MIN_APP_LOGIN_SERVER_ERROR(100_001_002, "支付宝小程序登录异常"),

    ;


    int code;
    String msg;

    ErrorCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
